package com.foreverwin.mes.production.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@TableName("Z_WORK_DAY_REST_TIME")
public class WorkDayRestTime extends Model<WorkDayRestTime> {

   private static final long serialVersionUID = 1L;

   @TableId(value = "HANDLE", type = IdType.INPUT)
   private String handle;
   @TableField("SITE")
   private String site;
   @TableField("WORK_CENTER")
   private String workCenter;
   @TableField("CREATOR")
   private String creator;
   @TableField("CREATED_DATE_TIME")
   private Date createdDateTime;
   @TableField("UPDATER")
   private String updater;
   @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss.SSS")
   @TableField("MODIFIED_DATE_TIME")
   private Date modifiedDateTime;
   @TableField( exist=false )
   private List<WorkDayRestTimeDetail> workDayRestTimeDetailList = new ArrayList<WorkDayRestTimeDetail>( );


   public String getHandle() {
      return handle;
   }

   public void setHandle(String handle) {
      this.handle = handle;
   }

   public String getSite() {
      return site;
   }

   public void setSite(String site) {
      this.site = site;
   }

   public String getWorkCenter() {
      return workCenter;
   }

   public void setWorkCenter(String workCenter) {
      this.workCenter = workCenter;
   }

   public String getCreator() {
      return creator;
   }

   public void setCreator(String creator) {
      this.creator = creator;
   }

   public Date getCreatedDateTime() {
      return createdDateTime;
   }

   public void setCreatedDateTime(Date createdDateTime) {
      this.createdDateTime = createdDateTime;
   }

   public String getUpdater() {
      return updater;
   }

   public void setUpdater(String updater) {
      this.updater = updater;
   }

   public Date getModifiedDateTime() {
      return modifiedDateTime;
   }

   public void setModifiedDateTime(Date modifiedDateTime) {
      this.modifiedDateTime = modifiedDateTime;
   }

   public List<WorkDayRestTimeDetail> getWorkDayRestTimeDetailList() {
      return workDayRestTimeDetailList;
   }

   public void setWorkDayRestTimeDetailList(List<WorkDayRestTimeDetail> workDayRestTimeDetailList) {
      this.workDayRestTimeDetailList = workDayRestTimeDetailList;
   }

   public static final String HANDLE = "HANDLE";

   public static final String SITE = "SITE";

   public static final String WORK_CENTER = "WORK_CENTER";

   public static final String CREATOR = "CREATOR";

   public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";

   public static final String UPDATER = "UPDATER";

   public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";

   @Override
   protected Serializable pkVal() {
      return this.handle;
   }

   @Override
   public String toString() {
      return "WorkDayRestTime{" +
              "handle = " + handle +
              ", site = " + site +
              ", workCenter = " + workCenter +
              ", creator = " + creator +
              ", createdDateTime = " + createdDateTime +
              ", updater = " + updater +
              ", modifiedDateTime = " + modifiedDateTime +
              "}";
   }
}